#ifndef LAZY_H
#define LAZY_H
#include<iostream>
#include<thread>
#include<mutex>
using namespace std;
class  LAZY
{
  private:
    explicit    LAZY();
    LAZY(const LAZY &la) = delete;
    LAZY &operator= (const LAZY &LA) const = delete;
    static LAZY * instance;
    class AutoDelete
    {
        public:
        ~AutoDelete()
        {
            if(instance != nullptr)
            {
                delete instance;
                std::cout<<"delete  instance..."<<std::endl;
            }
        }
    };
    static AutoDelete ADelte;

  public:
    static LAZY *getinstance();
    void show();
};

#endif // LAZY_H




